#ifndef INPUT_H
#define INPUT_H

#include "def.h"
#include "graphics.h"
#include "cmus-rg.h"

void init_input();
void cleanup_input(cr_button_node *root);
button construct_button(char id, int x, int y, int w, int h, void (*callback)(void* data), cr_drawable d[2]);
void update_button(cr_button_node *root, char id, int x, int y, int w, int h, void (*callback)(void* data), cr_drawable visual[2], bool update_area, bool update_callback, bool update_visual);
void register_mousedown_event(cr_button_node **root, cr_button_node **tail, button b);
void destroy_buttons(cr_button_node *root);
void get_input(bool *update, cr_button_node *root, int *window_w, int *window_h, int *border);

#endif